package homework;

/**
 * @classname:demo05
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/8 17:37
 * @version: 0.1
 * @since:1.8
 */
public class demo05 {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3};
        StringBuilder sb = new StringBuilder();
        sb.append("[");
        for (int i = 0; i < arr.length; i++) {
            sb.append(arr[i]);
            if (i == arr.length - 1)
                sb.append("]");
            else sb.append(",");
        }
        System.out.println(sb.toString());
    }
}
